package reflection;

import java.lang.reflect.Field;

/**
 * @author Administrator
 * @decription
 * @Date 2018-02-26 8:38
 */
public class FiledDemo {
    public static void main(String[] args) throws ClassNotFoundException, NoSuchFieldException {
        Class personClass = Person.class;
        Field[] fields = personClass.getDeclaredFields();
        for (Field field : fields) {
            System.out.println(field.getType());
        }

        Field one = personClass.getDeclaredField("name");
        System.out.println(one.getType());
    }
}
